<?php

use App\Http\Controllers\Stock\AdminController;
use App\Http\Controllers\Stock\Controller;
use App\Http\Controllers\Stock\Manage\SourceController;
use Illuminate\Support\Facades\Route;

Route::prefix('admin')->group(function(){
    Route::post('login',[AdminController::class,'login']);
    Route::post('bind',[AdminController::class,'bind']);
});

Route::prefix('admin')->middleware('AdminAuth')->group(function(){
    Route::post('unbinding',[AdminController::class,'unbinding']);
    Route::post('avatar',[AdminController::class,'avatar']);
    Route::post('profile',[AdminController::class,'profile']);
});

Route::prefix('manage')->middleware('AdminAuth')->group(function(){
    Route::post('source/index',[SourceController::class,'index']);
    Route::post('source/add',[SourceController::class,'add']);
});

Route::prefix('controller')->middleware('AdminAuth')->group(function(){
    Route::post('total',[Controller::class,'total']);
    Route::post('business',[Controller::class,'business']);
});